package values.avatar
{
import flash.events.IEventDispatcher;
import flash.utils.Dictionary;

import isoengine.interfaces.IMapObjectData;

import mapengine.interfaces.IMapAvatar;

import values.buff.BuffValue;
import values.common.IAvatarProperty;
import values.item.EquipmentItemValue;
import values.level.AvatarLevelValue;
import values.skill.IBuffDebuffEffectValue;
import values.skill.SkillValue;
import values.tech.PlayerTechValue;

public interface IAvatarValue extends IEventDispatcher, IAvatarProperty, IMapObjectData
{
	function initialize(template:AvatarTemplateValue, tech:PlayerTechValue, params:* = null):void;
	
	function get avatar():IMapAvatar;
	
	function set avatar(value:IMapAvatar):void;
	
	function get template():AvatarTemplateValue;
	
	function get key():String;
	
	/**
	 * 名字 
	 * @return 
	 * 
	 */	
	function get name():String;
	
	function get avatarType():AvatarTypeValue;
	
	/**
	 * 科技 
	 * @param value
	 * 
	 */	
	function get playerTechValue():PlayerTechValue;
		
	/**
	 * 阵营 
	 * @param value
	 * 
	 */	
	function set party(value:int):void;
	
	function get party():int;
	
	/**
	 * 是否是自己的单位 
	 * @return 
	 * 
	 */	
	function get isOwen():Boolean;
	
	/**
	 * 是否是友军的单位 
	 * @return 
	 * 
	 */	
	function get isAlly():Boolean;
	
	/**
	 * 是否是中立的单位 
	 * @return 
	 * 
	 */	
	function get isNeutral():Boolean;
	
	/**
	 * 是否是敌对单位 
	 * @return 
	 * 
	 */	
	function get isEmeny():Boolean;
	
	/**
	 * 身上是否有装备 
	 * @return 
	 * 
	 */	
	function get hasEquipment():Boolean;
	
	/**
	 * 等级 
	 * @return 
	 * 
	 */	
	function get level():int;
	
	function get levelValue():AvatarLevelValue;
	
	/**
	 *  经验值
	 * @return 
	 * 
	 */	
	function set xp(value:Number):void;
	
	function get xp():Number;
	
	function initBattleState():void;
	
	/**
	 *  是否死亡
	 * @return 
	 * 
	 */	
	function get isDead():Boolean;
	
	/**
	 *  是否能移动
	 * @return 
	 * 
	 */	
	function set movable(value:Boolean):void;
	
	function get movable():Boolean;
	
	/**
	 *  是否能攻击
	 * @return 
	 * 
	 */	
	function set attackable(value:Boolean):void;
	
	function get attackable():Boolean;
	
	/**
	 *  是否能操作
	 * @return 
	 * 
	 */	
	function set active(value:Boolean):void;
	
	function get active():Boolean;
	
	/**
	 * 开启技能格 
	 * 
	 */	
	function unlockSlot(index:int):void;
	
	/**
	 * 奥义技能 
	 * @return 
	 * 
	 */	
	function get ultimateSkill():SkillValue;
	
	/**
	 * 当前技能 
	 * @return 
	 * 
	 */	
	function get selectedSkill():SkillValue;
	
	/**
	 *  此方法只针对非奥义技能 
	 * @param skillKey
	 * 
	 */	
	function changeSkill(skillKey:String):void;
	
	/**
	 * 此方法只针对非奥义技能 
	 * @param slot
	 * @return 
	 * 
	 */	
	function getSkillBySlot(slot:int):SkillValue;
	
	function getSkillByKey(skillKey:String):SkillValue;
	
	/**
	 * 学习或者升级技能 
	 * @param skillTemplate
	 * @param skillLevel
	 * 
	 */	
	function learnSkill(skillKey:String, skillLevel:int = 1):void;
	
	/**
	 * 是否拥有某技能 
	 * @param skillKey
	 * @return 
	 * 
	 */	
	function hasLearnSkill(skillKey:String):Boolean;
	
	function get hasLearnUltimateSkill():Boolean;
	
	/**
	 * Buff 列表 
	 * @return 
	 * 
	 */	
	function get buffs():Vector.<BuffValue>;
	
	/**
	 * 新增一个buff 
	 * @param name
	 * @param desc
	 * @param icon
	 * @param type
	 * @param time
	 * @param params
	 * 
	 */	
	function addBuff(name:String, desc:String, icon:String, type:int, time:int, params:*):void;
	
	/**
	 * 移除一个buff 
	 * @param buff
	 * 
	 */	
	function removeBuff(buff:BuffValue):void;
	
	/**
	 * 获得某部位上的装备 
	 * @param positionKey
	 * @return 
	 * 
	 */	
	function getEquipmentByPosition(positionKey:String):EquipmentItemValue;
	
	/**
	 * 装备一样物品 
	 * @param item
	 * 
	 */	
	function addEquipment(item:EquipmentItemValue):void;
	
	/**
	 * 拿下一件装备 
	 * @param item
	 * 
	 */	
	function removeEquipment(item:EquipmentItemValue):void;
	
	/**
	 * 判断是否能装备某样物品 
	 * @param item
	 * @return 
	 * 
	 */	
	function canEquipItem(item:EquipmentItemValue):Boolean;
	
	/**
	 * 获取当前的角色形象 
	 * @return 
	 * 
	 */	
	function get skinAsset():AvatarAssetValue;
	
	/**
	 * 额外属性组 
	 * @return 
	 * 
	 */	
	function get propertyPlusers():Dictionary;    /* IAvatarPropertyPluser */
	
	/**
	 * 获得指定的额外属性组 
	 * @param key
	 * @return 
	 * 
	 */	
	function getPropertyPluserByKey(key:String):IAvatarPropertyPluser;
	
	/**
	 * 重新计算所有属性加成 
	 * @param properties
	 * 
	 */	
	function refreshProperties(properties:* = null):void;
	
	function get debuff():IBuffDebuffEffectValue;
	
	function get buff():IBuffDebuffEffectValue;
	
	function set debuff(value:IBuffDebuffEffectValue):void;
	
	function set buff(value:IBuffDebuffEffectValue):void;
}
}





